home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / Drop•MPSR / Spinning Cursor Lib ƒ / Main.c next >
Encoding:
C/C++ Source or Header  |  1994-12-03  |  787 b   |  68 lines  |  [TEXT/KAHL]

  1. /*
  2.     Main.c
  3.     
  4.     Entry point for the application.
  5.     
  6. */
  7.  
  8. #include "Main.h"
  9. #include "SpinLib.h"
  10.  
  11. /*
  12.     InitToolbox
  13.     
  14.     Initializes the Mac's toolbox.
  15. */
  16. void InitToolbox(){
  17.     
  18.     InitGraf((Ptr) &qd.thePort);
  19.     InitFonts();
  20.     InitWindows();
  21.     InitMenus();
  22.     FlushEvents(everyEvent,0);
  23.     TEInit();
  24.     InitDialogs(0L);
  25.     InitCursor();
  26. }
  27.  
  28. /*
  29.     main
  30.     
  31.     Main entry point for the application.
  32. */
  33. void main(){
  34.     short i;
  35.     long lt;
  36.     
  37.     InitToolbox();
  38.     
  39.     if (SpinInit())
  40.         SysBeep(10);
  41.     
  42.     if (SpinStart(1))
  43.         SysBeep(10);
  44.  
  45.     FlushEvents(everyEvent,0);
  46.     while(!Button());
  47.  
  48.     if (SpinStop())
  49.         for (i=0;i<3;i++)
  50.         SysBeep(10);
  51.     
  52.     Delay(180,<);
  53.     
  54.     if (SpinStart(-1)){
  55.         SysBeep(10);
  56.         SysBeep(10);
  57.     }
  58.  
  59.     FlushEvents(everyEvent,0);
  60.     while(!Button());
  61.  
  62.     if (SpinStop())
  63.         SysBeep(10);
  64.     
  65.     if (SpinCleanup())
  66.         SysBeep(10);
  67. }
  68.